import request from '@/utils/request'
import {content} from "./base";

export function getPage(params) {
  return request({
    url: content + '/prefrenceArea/getPage',
    method:'post',
    contentType: "application/json;charset=UTF-8",
    data: params
  })
}

export function getArea(id){
  return request({
    url: content + 'prefrenceArea/getArea/' + id,
    method: 'get',
  })
}

export function deleteArea(ids) {
  return request({
    url: content + '/prefrenceArea/delete',
    method: 'post',
    data: ids
  })
}

export function createArea(data) {
  return request({
    url: content + '/prefrenceArea/create',
    method: 'post',
    data: data
  })
}

export function updateArea(id, data) {
  return request({
    url: content + '/prefrenceArea/update/' + id,
    method: 'post',
    data: data
  })
}

export function updateShowStatus(params) {
  return request({
    url: content + '/prefrenceArea/update/showStatus',
    method: 'post',
    data: params
  })
}
